<?php
/*
 * 消息通知工厂
 */
class Notice 
{
	public static function factory ($type)
	{
		switch ($type)
		{
		case 'email' :
			return new Notice_Email();
			break;
			
		case 'microblog' :
			return new Notice_MBlog();
			break;

		case 'sms' :
			return new Notice_SMS;
			break;

		case 'notification' :
			return new Notice_Notification;
			break;

		case 'sysnotice':
			return new Notice_Sysnotice;
			break;

		default :
			throw new Kohana_Exception("无效的通知类型");
			break;
		}
	}
}
